package net.aaa.hotel.dao.impl;

import net.aaa.hotel.dao.DaSao;
import net.aaa.hotel.util.BaseDB;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
public class DaSaoImpl implements DaSao {
    @Override
    public List<Map> getAllConsumable() {
        String sql = "select * from yu";
        return BaseDB.queryMap(sql);
    }

    @Override
    public int changeKuCun(String id, int count) {
        String sql = "update yu set count=? where id=?";
        return BaseDB.update(sql,count,id);
    }
}
